const fn = (state = {
  list: [],
  hasError: false,
  value: '',
  password: '',
}, action) => {
  const {type, data} = action;
  switch (type) {
    case 'CHANGE_HASERROR' :
     return state = {
      list: state.list,
      hasError: data,
      value: state.value,
      password: state.password
    }
    case 'CHANGE_LIST' :
     return state = {
      list: data,
      hasError: state.hasError,
      value: state.value,
      password: state.password
    }
    case 'CHANGE_VALUE' :
     return state = {
      list: state.list,
      hasError: state.hasError,
      value: data,
      password: state.password
    }
    case 'CHANGE_PASSWORD' :
     return state = {
      list: state.list,
      hasError: state.hasError,
      value: state.value,
      password: data
    }
    default:
      return state
  }
}
export default fn